/**
 * 
 */
package com.ez.supervise.service.impl;

import java.util.List;

import com.ez.supervise.core.Page;
import com.ez.supervise.dao.DemocracyCheckmanDao;
import com.ez.supervise.model.biz.DemocracyCheckman;
import com.ez.supervise.service.DemocracyCheckmanService;

/**
 * @author searph.wang
 * @email searph.wang@gmail.com
 * @Created at 2009-7-22
 * 
 */
public class DemocracyCheckmanServiceImpl implements DemocracyCheckmanService {
    private DemocracyCheckmanDao democracyCheckmanDao;

    // public int update(DemocracyCheckman org) {
    // return sqlMapClientTemplate.update("sys.updateDemocracyCheckman", org);
    // }

    public void setDemocracyCheckmanDao(DemocracyCheckmanDao democracyCheckmanDao) {
	this.democracyCheckmanDao = democracyCheckmanDao;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#delete(java.lang.Long)
     */
    public void delete(Long id) {
	democracyCheckmanDao.delete(id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#insert(java.lang.Object)
     */
    public void insert(Object entity) {
	democracyCheckmanDao.insert(entity);

    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#update(java.lang.Object)
     */
    public void update(Object entity) {
	democracyCheckmanDao.update(entity);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#get(java.lang.Long)
     */
    public Object get(Long id) {
	return (DemocracyCheckman) democracyCheckmanDao.get(id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.ez.supervise.service.DemocracyCheckmanService#findByPage(com.ez.supervise.core.
     * Page)
     */
    public void findDemocracyCheckmanByPage(Page page) {
	page.setTotalProperty(democracyCheckmanDao.findDemocracyCheckmanByCount(page));
	page.setRoot(democracyCheckmanDao.findDemocracyCheckmanByPage(page));
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.DemocracyCheckmanService#findAll()
     */
    public List findAll() {
	return democracyCheckmanDao.findAll();
    }
}
